//
//  ZZCRefundCell.m
//  ZZC-Finance
//
//  Created by mac on 2017/6/10.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "ZZCRefundCell.h"
#import "ZZCRefund.h"
@implementation ZZCRefundCell

-(void)setRefundModel:(ZZCRefund *)refundModel {
    _refundModel = refundModel;
    
    _numberLabel.text = [NSString stringWithFormat:@"第 %@ 期",refundModel.cycle];
    _moneyLabel.text = [NSString stringWithFormat:@"%@U币",refundModel.total];
    _timeLabel.text = refundModel.create_time;
    _principalAndInterest.text = [NSString stringWithFormat:@"%@ + %@",refundModel.capital,refundModel.interest];
    if ([refundModel.status integerValue] == 1) {
        [self.refundBtn setTitle:@"还款" forState:0];
        self.refundBtn.userInteractionEnabled = YES;
    } else if ([refundModel.status integerValue] == 2){
        [self.refundBtn setTitle:@"已还" forState:0];
        self.refundBtn.userInteractionEnabled = NO;

    }
}
@end
